@use "../variables";

.product {
  background-color: variables.$color-pearl;
  padding-top: 65px;
  padding-bottom: 140px;

  h3 {
    margin: 0 0 55px;
    font-family: variables.$ff-roboto-condensed;
    font-weight: 400;
    font-size: 36px;
    line-height: 51px;
    color: variables.$color-default-white;

    @media (max-width: variables.$vp-max-tablet) {
      margin-bottom: 40px;
    }

    @media (max-width: variables.$vp-max-mobile) {
      margin-bottom: 29px;
      font-size: 28px;
      line-height: 39px;
    }
  }

  ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 80px 85px;

    @media (max-width: variables.$vp-max-tablet) {
      display: block;
    }
  }

  @media (max-width: variables.$vp-max-tablet) {
    padding-top: 55px;
    padding-bottom: 76px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    padding-top: 47px;
    padding-bottom: 86px;
  }
}

.product__item {
  position: relative;
  display: block;

  @media (max-width: variables.$vp-max-tablet) {
    margin-top: 30px;

    &:first-of-type {
      margin-top: 0;
    }
  }

  &:hover,
  &:focus-visible {
    opacity: 0.7;
  }

  &:active {
    opacity: 0.3;
  }
}

.product__item h4 {
  position: absolute;
  top: 0;
  padding: 45px 40px 0 40px;
  min-width: 240px;
  margin: 0;
  z-index: 1;
  font-family: variables.$ff-roboto-condensed;
  font-weight: 400;
  font-size: 20px;
  line-height: 30px;
  color: variables.$color-default-white;

  @media (max-width: variables.$vp-max-tablet) {
    padding: 37px 45px 0 45px;
  }

  @media (max-width: variables.$vp-max-mobile) {
    width: 190px;
    padding: 26px 30px 0 30px;
    font-size: 18px;
  }
}

.product__image {
  display: block;

  img {
    object-fit: contain;
    width: 100%;
  }
}

.product__icon {
  position: absolute;
  right: 0;
  bottom: 0;

  @media (max-width: variables.$vp-max-mobile) {
    width: 40px;
    height: 40px;
  }

  &:hover,
  &:focus-visible {
    background-color: variables.$color-pearl-fade;
    opacity: 0.8;
  }

  &:active {
    background-color: variables.$color-pearl-fade;
    opacity: 0.6;
  }
}
